Remove gtk_dialog_run() from GtkPrintUnixDialog
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 30 Apr 2020 17:45:01 +0000 (18:45 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 12 May 2020 12:45:15 +0000 (13:45 +0100)
commit0a6848d70bd49d67034ceae005ce972386f08553
tree9a06816d7d4c3b69a96d9f9ea1d6ccb694887e28
parentb8988be4b50069317b07fe13dcd9d950eb7d2a4f
Remove gtk_dialog_run() from GtkPrintUnixDialog

Replace it with an explicit nested main loop, as we need to block the
signal handler currently being emitted depending on the response of the
overwrite confirmation dialog.

This is a bit of a hack, and the only reason we need it is that the
print dialog will load the last used path as the output file name, when
printing to a file; this means that, in theory, it would be possible to
press Print without selecting a file, and accidentally overwriting an
existing file.

It would be much simpler if we did not store the last used path, and
always explicitly asked the user to select a file; this would avoid
destructive actions, and would allow us to rely on the overwrite
confirmation dialog right inside the file chooser.
gtk/gtkprintunixdialog.c